﻿using AutoMapper;
using LivestreamE_Commerce.Dto.CreateUpdateDto;
using LivestreamE_Commerce.Dto.GoodsDto;
using LivestreamE_Commerce.Dto.RBACDto;
using LivestreamE_Commerce.Dto.SpuSkuDto;
using LivestreamE_Commerce.Dto.Tree;
using LivestreamE_Commerce.Model.Goods;
using LivestreamE_Commerce.Model.RBAC;
using LivestreamE_Commerce.Model.SPUSKU;

namespace LivestreamE_Commerce
{
    public class LivestreamE_CommerceApplicationAutoMapperProfile : Profile
    {
        public LivestreamE_CommerceApplicationAutoMapperProfile()
        {
            /* You can configure your AutoMapper mapping configuration here.
             * Alternatively, you can split your mapping configurations
             * into multiple profile classes for a better organization. */
            #region 购物车实体映射

            CreateMap<GoodsModel, GoodsDto>();
            CreateMap<CreateUpdateGoodsDto, GoodsModel>();

            CreateMap<GoodsImgModel, GoodsImgDto>();
            CreateMap<CreateUpdateGoodsImgDto, GoodsImgModel>();

            CreateMap<GoodsSpecificationModel, GoodsSpecificationDto>();
            CreateMap<CreateUpdateGoodsSpecificationDto, GoodsSpecificationModel>();

            CreateMap<GoodsTypeModel, GoodsTypeDto>();
            CreateMap<CreateUpdateGoodsTypeDto, GoodsTypeModel>();

            CreateMap<ImgModel, ImgDto>();
            CreateMap<CreateUpdateImgDto, ImgModel>();

            CreateMap<SpecificationModel, SpecificationDto>();
            CreateMap<CreateUpdateSpecificationDto, SpecificationModel>();

            CreateMap<IndentDetailModel, IndentDetailDto>();
            CreateMap<CreateUpdateIndentDetailDto, IndentDetailModel>();

            CreateMap<IndentModel, IndentDto>();
            CreateMap<CreateUpdateIndentDto, IndentModel>();

            CreateMap<SiteModel, SiteDto>();
            CreateMap<CreateUpdateSiteDto, SiteModel>();

            CreateMap<UserImgModel, UserImgDto>();
            CreateMap<CreateUpdateUserImgDto, UserImgModel>();


            #endregion
            #region RBAC实体映射
            CreateMap<LogModel, LogDto>();
            CreateMap<CreateUpdateLogDto, LogModel>();

            CreateMap<MenuModel, MenuDto>();
            CreateMap<CreateUpdateMenuDto, MenuModel>();

            CreateMap<OrganizationModel, OrganizationDto>();
            CreateMap<CreateUpdateOrganizationDto, OrganizationModel>();

            CreateMap<RoleModel, RoleDto>();
            CreateMap<CreateUpdateRoleDto, RoleModel>();

            CreateMap<RoleMenuModel, RoleMenuDto>();
            CreateMap<CreateUpdateRoleMenuDto, RoleMenuModel>();

            CreateMap<UserModel, UserDto>();
            CreateMap<CreateUpdateUserDto, UserModel>();

            CreateMap<UserRoleModel, UserRoleDto>();
            CreateMap<CreateUpdateUserRoleDto, UserRoleModel>();

            #endregion
            #region SpuSku实体映射
            CreateMap<BrandAndProductTypeRelationshipModel, BrandAndProductTypeRelationshipDto>();

            CreateMap<CommodityBrandModel, CommodityBrandDto>();

            CreateMap<CommodityInformationModel, CommodityInformationDto>();

            CreateMap<FeatureSelectionModel, FeatureSelectionDto>();

            CreateMap<GoodsCategoryModel, GoodsCategoryDto>();

            CreateMap<GoodsInformationModel, GoodsInformationDto>();

            CreateMap<GoodsInventoryModel, GoodsInventoryDto>();

            CreateMap<ProductPropertySelectionAssociationModel, ProductPropertySelectionAssociationDto>();

            CreateMap<ProductSpecificationSelectionAssociationModel, ProductSpecificationSelectionAssociationDto>();

            CreateMap<SpecificationGroupingTableModel, SpecificationGroupingTableDto>();

            CreateMap<SpecificationParameterSelectionModel, SpecificationParameterSelectionDto>();

            CreateMap<SpecificationsParameterInformationModel, SpecificationsParameterInformationDto>();

            CreateMap<TheAttributeNameModel, TheAttributeNameDto>();

            CreateMap<TypeOfMerchandiseModel, TypeOfMerchandiseDto>();

            #endregion

        }
    }
}
